import { defineStore } from "pinia";

interface Patient {
  patient_id: string;
  name: string;
}

const patientStore = defineStore("my_data", {
  //数据仓库
  state: () => ({
    //定义病人信息
    patient: {} as Patient,
  }),
  //写逻辑，异步，同步
  actions: {
    //添加就诊人
    addPatient(value: Patient) {
      console.log("pinia数据：", value);
      this.patient = value;
    },
  },
  //计算属性
  // getters:{}
});

export { patientStore };
